def main():
    a = "123435454623"
    b = "4905038085"

    is_minus = False

    if int(a) < int(b):
        is_minus = True
        a, b = b, a

    a_list = [int(c) for c in a]
    b_list = [int(c) for c in b]
    c_list = []

    if len(a_list) > len(b_list):
        bnum = a_list
        snum = b_list
    elif len(a_list) == len(b_list):
        found = False
        for i in range(0, len(a_list)):
            if a_list[i] > b_list[i]:
                bnum = a_list
                snum = b_list
                found = True
                break
            elif a_list[i] < b_list[i]:
                bnum = b_list
                snun = a_list
                found = True
                break
        if found == False:
            c_list.append(0)
            print("0")
            return
    else:
        bnum = b_list
        snum = a_list

    a_list.reverse()
    b_list.reverse()

    for i in range(len(bnum) - len(snum) + 1):
        snum.append(0)

    for i in range(0, len(bnum)):
        if bnum[i] < snum[i]:
            bnum[i + 1] -= 1
            c = bnum[i] + 10 - snum[i]
            c_list.append(c)
            
        else:
            c = bnum[i] - snum[i]
            c_list.append(c)
                
    c_list.reverse()

    result = ""
    if is_minus == True:
        result = '-'
        
    i = 0
    for i in range(len(c_list)):
        if c_list[i] != 0:
            break

    for n in range(i, len(c_list)):
        result += str(c_list[n])

    print(result)

main()